﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>代理商列表-微街秀管理后台</title>
<style>
body{ background-color:White; font-size:14px;}
table{border-collapse: collapse;border: none;width:100%; text-align:center;}
td{border: solid #ccc 1px;color:Black; height:26px;}
td a{ text-decoration:none;}
.td1,.td2,.td3,.td6{width:100px; font-weight:bold; text-align:center;}
.td4,.td5{width:250px; font-weight:bold; text-align:center;}
.td4{width:80px;}
.tdimg a{ color:Black;}
.tdimg img{ height:60px;}
/*分页*/
.pager_style{width:100%;height:30px;margin-top:10px;text-align:left;color:#909090;}
.pager_style li{font-size:14px;}
.pager_style .page_num{height:100%;font-size:0;display:inline-block; float:left;}
.pager_style .page_num li{height:100%;border:1px solid #eeeeee;padding:0 10px;margin-right:5px;line-height:30px;display:inline-block;cursor:pointer;float:left;}
.pager_style .page_num li:hover{border:1px solid #f37b0b;background-color:#f37b0b;color:White;}

/*分页 选中当页样式*/
.pager_style .page_num .active{border:1px solid #f37b0b;background-color:#f37b0b;color:White;cursor:default;}
/*分页 不可用样式*/
.pager_style .page_num .disable{background-color:#f1f1f1;}
.pager_style .page_num .disable:hover{border:1px solid #eeeeee;background-color:#f1f1f1;color:#909090;}

.pager_style .page_info{display:none;float:left;}
.pager_style .page_info li{display:inline-block;margin-left:10px;float:left;line-height: 30px;}


.wrap{ 
    font-size: 12px; 
    margin:40px auto; 
    width:400px; 
} 
/*进度条样式*/ 
.progressbar_1{ 
    background-color:#eee; 
    height:10px; 
    width:150px; 
    border:1px solid #bbb; 
    color:#222; 
    margin-left: 12px;
    margin-bottom:3px;
} 
.progressbar_1 .bar { 
    background-color:#6CAF00; 
    height:10px; 
    width:0; 
} 
.left{float:left; font-size:12px;}
</style>
    <script src="../js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../js/base.js" type="text/javascript"></script>
    <script src="../js/ajax-data.js" type="text/javascript"></script>
    <script src="../js/Pager.js" type="text/javascript"></script>
    <script src="../js/dialog.js" type="text/javascript"></script>
</head>
<body>

<div style="width:860px; margin-left:auto; margin-right:auto;">
<div> 会员编号:<input type="text" id="userid" name="userid" style="width:80px;" />
    标题:<input type="text" id="key_word" name="key_word" style="width:120px;"/>
    <input type="button" id="btn" value="搜 索" onclick="submits()" /></div>
    <br />
  <table>
  <tr>
  <td style='width:60px;'>微街秀ID</td>
    <td style='width:60px;'>封面</td>
    <td class='td5'>标题</td>
    <td style='width:50px;'>总价
    <td style='width:90px;'>进度</td>
    <td style='width:90px;'>地区</td>
    <td style='width:100px;'>发布时间</td>
    </tr>
    <tbody id="list">
    </tbody>
    </table>
 <div class="pager_style">
    <ul class="page_num"></ul>
    <ul class="page_info">
        <li>总数:<span id="count">0</span></li>
        <li>每页:<span id="pageSize">0</span></li>
        <li>页数:<span id="pageToal">0</span></li>
    </ul>
</div>
<input type="hidden" id="pagecount" value="0" />
</div>
 <script>
     $(function () {
         GetList(1);
     })

     function GetList(page) {
         var param = "page_index=" + page + "&is_pass=0&state=1";
         var userid = $("#userid").val();
         var key_word = $("#key_word").val();

         if (userid != "")
             param += "&userid=" + userid;

         if (key_word != "")
             param += "&title=" + decodeURIComponent(key_word);

         $("#list").html("");
         var html = "";

         AjaxStart("../ajax/fc_article.ashx?getlist", param, function (data) {
             if (data.code != 0) {
                 $("#list").html(html + "<tr><td colspan='8'>" + data.msg + "</td></tr>");
             }
             else {
                 $("#list").html("");
                 var list = data.item.table;
                 for (var i = 0; i < list.length; i++) {
                     var total = 0;
                     if (list[i].op_total != null && list[i].op_price != null)
                         total = parseFloat(list[i].op_total) * parseFloat(list[i].op_price);

                     var count1 = list[i].op_total - list[i].op_remainder;
                     var bili = parseFloat(parseFloat(count1 / list[i].op_total).toFixed(2)) * 100;
                     var width = parseInt(bili * 1.5);

                     html += "<tr>";
                     html += "<td>" + list[i].user_id + "</td>";
                     html += "<td style='height:40px;'><img src='" + list[i].logo + "' style='max-height:50px;max-width:60px;'/></td>";
                     html += "<td class='tdimg' style='text-align:left;'><a href='" + list[i].url + "'  target=\"_blank\">" + list[i].title + "</a></td>";
                     html += "<td>" + parseFloat(total) + "元</td>";
                     html += "<td><div class='progressbar_1'><div class='bar' style='width:" + width + "px;'></div></div>" +
                    "<div class='left' style='width:32%'>完成:" + count1 + "</div><div class='left' style='width:30%'>" + bili + "%</div><div class='left' style='width:32%'>总数:" + list[i].op_total + "</div>" +
                    "</td>";

                     var area = "全国";
                     if (list[i].op_area1 != null)
                         area = list[i].op_area1;
                     if (list[i].op_area2 != null)
                         area += "-" + list[i].op_area2;
                     if (list[i].op_area3 != null)
                         area += "-" + list[i].op_area3;
                     html += "<td>" + area + "</td>";
                     html += "<td>" + list[i].date.replace("T", " ").substring(0, 19) + "</td>";
                     html += "</tr>";
                 }

                 $("#list").html(html);
                 var pager = new Pager();
                 $(".page_info").css("display", "block")
                 pager.initPage(page, data.item.itemCount, 20, 5, GetList);
             }
         });
     }

     function submits() {
         GetList(1);
     }
 </script>
</body>
</html>
